<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<%@ include file="/common/meta.jsp" %>
<%@ include file="/common/jquery-ui-inc.jsp" %>
	<title>添加资源</title>
<script type="text/javascript">
	$(function(){
		$('#inputForm').form({
			url:'${ctx}/flow/task_url/flow-task-url!save.action',
		    onSubmit:function(){
		    	return $("#inputForm").form("validate");
		    },
		    success:function(data){
		    	var result = jQuery.parseJSON(data);
		    	if(result.flag=='T'){
		    		$.messager.alert('提交结果', '操作成功', 'info',function(){
		    			parent.closeAddWin();
		    		});
		    		parent.reload();
		    	
		    				
		    	}else{
		    		$.messager.alert('提交结果', result.msg, 'warning');
		    	}        
		    }
		});
	}) ;
</script>
<body>	
<div id="tip">
	<form id="inputForm" name="inputForm" method="post" action="${ctx}/flow/task_url/flow-task-url!save.action">
		<input type="hidden" name="sysId" id="sysId" value="${sysId}"/>
		<input type="hidden" name="taskId" id="taskId" value="${taskId}"/>
		<table class="datagrid-body" >
			<tr >
				<td class="datagrid-header">任务名称<span style="color:red;" >*</span></td>
				<td>
				<input name="flowTaskUrl.taskName"  id="lockCname" value="${flowTaskUrl.taskName}"
				class="easyui-validatebox" required="true" size="50" validType="length[1,50]" 
				missingMessage="请输入任务名称" invalidMessage="应为1~50个字" />				
				</td>
			</tr>
			
			<tr>
				<td class="datagrid-header">任务类型<span style="color:red;" >*</span></td>
				<td>
					<input type="radio" name="taskType"  value="1" checked="checked"  }/>人工处理任务
					<input type="radio" name="taskType"  value="2" ${flowTaskUrl.taskType=="2"?"checked=true":"" }/>自处理任务
				</td>
			</tr>
			
			<tr>
				<td class="datagrid-header">任务路径<span style="color:red;" >*</span></td>
				<td>
				<input id="lockPath" name="flowTaskUrl.taskUrl"  value="${flowTaskUrl.taskUrl}"
				class="easyui-validatebox" size="50" validType="length[1,100]" 
				missingMessage="请输入任务地址" invalidMessage="应为1~100个字" required="true"/>
				</td>
			</tr>	
			<tr>
				<td class="datagrid-header"></td>
				<td >	
				<a href="#" class="easyui-linkbutton" iconCls="icon-save"
					onClick="$('#inputForm').submit();">保存</a>	
				</td>
			</tr>
		</table>
	</form>
</div>
</body>
</html>
